package dynamicFields;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;
import javax.swing.JButton;
import javax.swing.JPanel;

import Models.Addition;

public abstract class Entry extends JPanel {
	
	EntryList parent;
	private JButton plus;
	private JButton minus;
	
	 public class AddEntryAction extends AbstractAction {
		 
			 public AddEntryAction() {
				 super("+");
			 }
			  
			 public void actionPerformed(ActionEvent e) {
				 //parent.cloneEntry(Entry.this);
				 //tell parent to add this entry then create a blank entry w/ add enabled
				 //disable the add & enable the minus for this recipe
				 //do any housekeeping
			 }
	
		 }
		  
		 public class RemoveEntryAction extends AbstractAction {
		  
			 public RemoveEntryAction() {
				 super("-");
			 }
		  
			 public void actionPerformed(ActionEvent e) {
				 parent.removeItem(Entry.this);
			 }
		 }
		  
		 public void setVisibleAdd(boolean visibility) {
			 this.plus.setVisible(visibility);
		 }
		 public void setVisibleMinus(boolean visibility) {
			 this.minus.setVisible(visibility);
		 }
}
